home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
Rinaldi
/
HC 2.0 Only
/
Tabloid 1.1.cpt
/
Tabloid 1.1
/
cards.xml
< prev
next >
Wrap
Text File
|
1991-02-05
|
12KB
|
123 lines
card_3055.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<card>
<id>3055</id>
<filler1>0</filler1>
<bitmap>BMAP_3273.pbm</bitmap>
<cantDelete> <false /> </cantDelete>
<showPict> <true /> </showPict>
<dontSearch> <false /> </dontSearch>
<owner>2661</owner>
<link rel="stylesheet" type="text/css" href="stylesheet_2387.css" />
<part>
<id>1</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>69</left>
<top>68</top>
<right>434</right>
<bottom>252</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>Text</name>
<script></script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>174</left>
<top>281</top>
<right>343</right>
<bottom>311</bottom>
</rect>
<style>roundrect</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Tabloid</name>
<script>on mouseUpif there is not a window "TheList"thenset cursor to watchTabloid "TheList",cd fld "List","dis"end ifend mouseUp</script>
</part>
<part>
<id>16</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>356</left>
<top>256</top>
<right>512</right>
<bottom>342</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<textHeight>12</textHeight>
<name>List</name>
<script></script>
</part>
<content>
<layer>card</layer>
<id>1</id>
<text><span class="style1"> </span><span class="style3">Tabloid 1.0</span><span class="style1"> </span><span class="style4"> by Frédéric RINALDI</span><span class="style1"></span><span class="style2">DESCRIPTION</span><span class="style1"> Tabloid XCMD displays a spreadsheet like XWindoid, with multiple cells and columns.</span><span class="style2">SYNTAX</span><span class="style1"> Tabloid <WName>[,<List>[,<WStyle>[,<X,Y[,Z,T]>][,<NO|ONE|CON|DIS>] [,<cell(s)>][,<textFont[,textSize]>][,<textAlign>][,<frame>]]</span><span class="style2">PARAMETERS</span><span class="style1"> Only first param is needed. Order of params 3 to 7 doesn't matter, since the XCMD is able to recognize them. WName is a string giving the windoid name. Many windoids can be opened by using different names. List is a comma/return delimited string that will be displayed. Line separator is return, column is comma. WStyle is a string defining the window style. Allowed styles are : plain, zoom, roundRect, rect, shadow, windoid, windoidZoom, bigWindoid, bigWindoidZoom, Rinaldoid, RinaldoidZoom (Rinaldoid is the same as windoid, except that it displays the window title). All window styles are floating, except plain, zoom and roundRect. A windoid or Rinaldoid style window will have small scrollbars, while other styles will use standard size. Default is RinaldoidZoom if Rinaldoid WDEF resource is present, windoidZoom if not found. <X,Y[,Z,T]> will be a point or a rect, and will define position and/or size of the windoid. Coordinated are card-relative. If omitted, windoid will appear with standard size at "0,10". <NO|ONE|CON|DIS> defines the selection mode (no selection, one at a time, may but adjacent, many disjoint). Default is ONE. <cell(s)> comma separated list of cell coordinates. Each cell coordinate is a string of two integers separated by space, giving line and column number of the cell ("<line>_<column>[...,<line>_<column>]"). It defines the selected cells(s) when the windoid appears. Default is "1 1", but "0 0" can be used to have no selection at start. <textFont[,textSize]> is the name of font and its size to use. Default is Geneva 10. <textAlign> is the text alignment in the cells (left, center, right). Default is "left". <frame> is a boolean telling if the cells must be framed or not. Default is true, but frame appears only if Tabloid LDEF is present in resource fork. Using "!" and "?" as parameter will return an online help (resp. copyright and syntax).</span><span class="style2">USING</span><span class="style1"> Tabloid is stand alone, no linked resource is needed. Meanwhile, this stack contains a LDEF, WDEF and CDEF resources that are recognized by the XCMD if present. The LDEF allows to have framed cells like in a spreadsheet, vertical centering of text in cells and text alignmenet. The WDEF allows to have an enhanced windoid-type window displaying title, while the CDEF is useful to get nice-looking scroll arrows for small scroll bars. So, these resources are optional, and for aesthetic purpose only. If you copy them, their ID can be set to any value but don't change their name.</span><span class="style3">HINT :</span><span class="style1"> If you use a rect ot shadow style window, placing it on a card can simulate a smart HyperCard spreadsheet field. If no rectangle param is used, the size of the window will be set according to maximum number of lines and columns contained in the list. The cells have all the same size which is automatically calculated according to the longest contained string. Clicking on cells(s) in the windoid sends a "TabloidSelect" message followed by the clicked word(s) and the Tabloid name. This message can be trapped using a handler :</span><span class="style5"> on TabloidSelect What,Where if Where is "MyList" and What is ... end TabloidSelect</span><span class="style1"></span><span class="style3">NOTE :</span><span class="style1"> in order to avoid HyperCard's confusion, existing quotes in What param are automatically changed to single quote. When a windoid is opened, the "openTabloid" message is sent, followed by the windoid name. This allows to define window properties before it is shown, since the message can be trapped using a handler :</span><span class="style5"> on openTabloid Which if Which is "MyWindow" then... end openTabloid</span><span class="style1"> When a windoid is close, the "closeTabloid" message is sent, followed by the windoid name. This message can be trapped using a handler :</span><span class="style5"> on closeTabloid Which if Which is "MyWindow" then... end closeTabloid</span><span class="style1"></span><span class="style3">HINT :</span><span class="style1"> the card script contains a "on ControlKey" handler that allows selection of first matching cell when typing a key in conjunction with control key. Moreover, while holding the control key down, the arrow keys allow to move in the list, return or enter to simulate a double-clic. It is possible to send any string to search for to the window using : </span><span class="style5">send "string" to window <WName></span><span class="style1"> If the string is found, it will be highlighted int the window. Look for "on controlKey" handler in the card script, type Control+Key to try it. The lockText property define the behaviour of the window. Default value is TRUE, meaning that a click on a cell selects it. When cursor is over window, holding Option key (or having lockText set to FALSE) allows to change cell size by dragging or edit their content. The cursor's shape tells exactly what can be done. One in editing mode, cell is framed and moving around is possible using Tab or Return key with or without Shift key (validation). To exit editing, type Enter (validation) or Escape key (cancelling), or click in any other cell. Setting properties involving cell size also resizes the window to keep previously visible cell still visible.</span><span class="style2">PROPERTIES</span><span class="style1"> Like any XWindow, Tabloid has properties that can be get and set thru HyperTalk. “properties of window "name"” will return an item list of all allowed properties : • loc : windoid's position according to card • visible : windoid's visibility • text : windoid's text • rect : windoid's position and size according to card • selectedCell : cell(s) currently selected • selectionMode : selection mode (NO|ONE|CON|DIS) • frame : cell frame (true|false) • columnWidth : width of columns in pixels • rowHeight : height of rows in pixels • lockText : locking/unlocking cells • textFont : font name • textSize : font size • textAlign : font alignment</span><span class="style2">ERRORS</span><span class="style1">If an error occurs, Tabloid can return : "Error : Missing window name" "Error : Duplicate window name" "Error : Empty parameter" "Error : Bad Font size" "Error : Unknown font name" "Error : Unrecognized parameter #xx" "Error : Unable to create XWindow" "Error : XWindows not implemented" "Error : Couldn't create list"</span><span class="style2">VERSION HISTORY</span><span class="style1"></span><span class="style3">1.1 :</span><span class="style1">• Added properties columnWidth, rowHeight, lockText, textFont, textSize & textAlign• Updated LDEF resource (1.1)• Added editing feature• Added cell sizing• Fixed window update• fixed window visible state when switching under MultiFinder--------------------------------------------------------------------This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.Any commercial use must be licensed and aknowledged by the author. © F. Rinaldi - 1989,1990,1991</span><span class="style3">AppleLink:</span><span class="style1"> RINALDI1 </span><span class="style3">Calvacom :</span><span class="style1"> FR10 </span><span class="style3">Compuserve :</span><span class="style1"> 71170,2111</span></text>
</content>
<content>
<layer>card</layer>
<id>16</id>
<text>This,is,a,testto,demonstratehow,Tabloid,works</text>
</content>
<name></name>
<script></script>
</card>